package com.server.questionbank.snframe.util.FileUtil.operation.command;

import com.server.questionbank.snframe.util.FileUtil.operation.base.AbstractOperation;
import io.minio.MinioClient;
import io.minio.RemoveObjectArgs;

public class DeleteCommand extends AbstractOperation<Void> {
    
    public DeleteCommand(MinioClient minioClient, String bucket, String object) {
        super(minioClient, bucket, object);
    }

    @Override
    protected Void doExecute() throws Exception {
        minioClient.removeObject(
            RemoveObjectArgs.builder()
                .bucket(bucket)
                .object(object)
                .build()
        );
        return null;
    }
} 